<?php

namespace Data;

class HelloReply extends Base {

    public function addHelloReply($helloId, $userId, $content) {
        $data = array(
            'HelloId' => $helloId,
            'UserId' => $userId,
            'Content' => $content,
            'CreateTime' => time(),
            'Status' => self::IS_YES,
        );
        $this->insert($data);
    }

    public function getHelloReply($helloId) {
        $condition = array(
            'HelloId' => $helloId,
            'Status' => self::IS_YES,
        );
        $result = $this->where($condition)->order('HelloReplyId desc')->findAll();
        return $result;
    }
}